package com.project;

import com.project.service.ICountry;
import com.project.service.IManService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
        //创建上下文对象，并制定配置类
        ApplicationContext context = new AnnotationConfigApplicationContext(ApplicationConfig.class);
//        IManService service = context.getBean(IManService.class);
//        IManService service = (IManService) context.getBean("ms");
//        service.run();

        IManService c = context.getBean(IManService.class);
        c.run();

        ((AnnotationConfigApplicationContext) context).close();
    }
}
